import request from '@/utils/request'

// 获取权限列表
export const getPermissionList = function(params) {
  return request.get('/sys/permission', { params: params })
}
// 新增权限
export const addPermission = function(data) {
  return request.post('/sys/permission', data)
}

// 更新权限
export const updatePermission = function(data) {
  return request.put(`/sys/permission/${data.id}`, data)
}
// 删除权限
export const delPermission = function(id) {
  return request.delete(`/sys/permission/${id}`)
}
// 获取权限详情
export const getPermissionDetail = function(id) {
  return request.get(`/sys/permission/${id}`)
}

